#ifndef __MID_USART1_H
#define __MID_USART1_H

#include "main.h"

#define USART1_MAX_REC_LEN 	255
#define USART1_NO_FINISH 		0xff
#define USART1_FINISH 			0x01

extern uint8_t usart1_data_buff[USART1_MAX_REC_LEN];

void usart1_idle_irqhanler(UART_HandleTypeDef *huart);
void register_usart1_rec_data(void);
uint16_t get_usart1_rec_len(void);
uint8_t get_usart1_rec_bit(void);
uint8_t* get_usart1_rec_data(void);

#endif
